export namespace IArticleComment {
    export interface ICommentReq {
        /**
         * 评论的文章ID
         */
        blogUid: string;
        /**
         * 评论内容
         */
        content: string;
        /**
         * 一级评论ID
         * */
        parentId?: number;
        /**
         * 二级级评论被回复的评论ID
         * */
        replyId?: number;
    }
}

/**
 * 评论列表
 */
export namespace ICommentList {
    /**
     * 评论人信息
     */
    export interface IUserInfo {
        avatar: string;
        userId: number;
        username: string;
    }

    /**
     * 二级评论明细
     */
        // eslint-disable-next-line no-use-before-define
    export interface SubCommentList extends IReplyInfo {
        // eslint-disable-next-line no-use-before-define
        replyInfo: IReplyInfo;
        subCommentId: number;
    }

    // eslint-disable-next-line no-use-before-define
    export interface IReplyInfo extends DataList {
        parentId: number;
        replyId: number | null;
    }

    /**
     * 二级评论
     */
    export interface SubComment {
        list: SubCommentList[];
        total: number;
    }

    /**
     * 一级评论明细
     */
    export interface DataList {
        blogUid: string;
        content: string;
        createDate: string;
        creator: number;
        description: null;
        commentId: number;
        isPublisher: number;
        likeCount: number;
        modifier: null;
        status: number;
        subComment: SubComment;
        updateDate: string;
        userInfo: IUserInfo;
    }

    /**
     * 一级评论
     */
    export interface IResponse {
        total: number;
        list: DataList[];
    }

    export interface IReq {
        blogUid: string;
        pageNum?: number;
        pageSize?: number;
        parentId?: number;
    }
}
